UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Ek9VC/CesnmvBTiYbmsWAcU7ZKmgQwJWgL2Bx37zpMk='
WHERE
key_id = '62f6548b1414ee033fa91286ce80c31a85240a2ef6bf615881671120c92a6582'
AND (
token = 'Ek9VC/CesnmvBTiYbmsWAcU7ZKmgQwJWgL2Bx37zpMk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)