UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ITiXndWL2ocJ6gam5JMrcdTeH+QYPL2n3j3+5RY62dE='
WHERE
key_id = '39c0a67aa31cec6698bfb8a1c985f1bc0c7b0cb83e248dc5c927de0bc8891776'
AND (
token = 'ITiXndWL2ocJ6gam5JMrcdTeH+QYPL2n3j3+5RY62dE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)