UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'BFIoW25AQ9O/0Xff/WMRmdiwwKrq6/mS9M1Fwj5FwGE='
WHERE
key_id = 'fb911fee52ce7b74aa6964755d9c394e557ca2639a3a5a8ff0a3fa3d2c658801'
AND (
token = 'BFIoW25AQ9O/0Xff/WMRmdiwwKrq6/mS9M1Fwj5FwGE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)