UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'RNFkNLR1FFy9GgMD0Tqphi/UyixMduaD8WTfTJTNRZI='
WHERE
key_id = 'a084163bc464c76e53d65125869603818372209100b2e25f2906eeda378d202d'
AND (
token = 'RNFkNLR1FFy9GgMD0Tqphi/UyixMduaD8WTfTJTNRZI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)