UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'rtGLRVbtoWRPurCXdly9ilvFEgI+76Z6c+hiBeCxQ3I='
WHERE
key_id = '755ebe060b4ef41b0f678ded226e544b22dee369ba343313722c265e77beec28'
AND (
token = 'rtGLRVbtoWRPurCXdly9ilvFEgI+76Z6c+hiBeCxQ3I='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)