UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'KjmrPNZKMp58UKb0zSInPdiPbg7vRxtz998gsRE1784='
WHERE
key_id = '914279e92db2e4c944b1031cdb876c9f8a9a1c05baa864dd242dff084e78706f'
AND (
token = 'KjmrPNZKMp58UKb0zSInPdiPbg7vRxtz998gsRE1784='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)