UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '4c6y55S2R2n5qo1lfGKXpD9bSF3dbEZ+sil/RdTftKA='
WHERE
key_id = '0bbfbcb5c01ef2f9f967db94de95b4c6ef0b9f401c5bfb8c75973aefc8d15d86'
AND (
token = '4c6y55S2R2n5qo1lfGKXpD9bSF3dbEZ+sil/RdTftKA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)