UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '2zoankJwGqy5EvNIlsZSM4WPmqsCTGtCsP+wCrhQca0='
WHERE
key_id = '9674b3ea806ce2ba58de4d3f3f5547b6fadf750fb1452285d7dcef1fda3635d9'
AND (
token = '2zoankJwGqy5EvNIlsZSM4WPmqsCTGtCsP+wCrhQca0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)