UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'MotZD7RBVzkrTLtOvJS8MX8sgFq2ZZgQAFkcS2LPuu0='
WHERE
key_id = '73a3c2de80be9924b187107e4adf817658af223785f68afa47c01c235dbdbdd2'
AND (
token = 'MotZD7RBVzkrTLtOvJS8MX8sgFq2ZZgQAFkcS2LPuu0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)