UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'xld5pB5ZStXDK/diDuBFJZncSdcRD82UUHlNVCSpnDs='
WHERE
key_id = '6960627676fd3daacba12c22bd0e7dece7b466687929791e1a341507d797f061'
AND (
token = 'xld5pB5ZStXDK/diDuBFJZncSdcRD82UUHlNVCSpnDs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)