UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'j3IUniph8jL3mSqhDmOvnBNSE9URBxOwG1DChiJ9JHc='
WHERE
key_id = '52bd2747a2fb613d314f292ae2007eae628d54944cf89de50deeda7ed3e5e23f'
AND (
token = 'j3IUniph8jL3mSqhDmOvnBNSE9URBxOwG1DChiJ9JHc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)