UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'NnMsAK3fgKuuvDWgrFVLIHR08BTeMw+Lpz0NBlnDQso='
WHERE
key_id = '43fd871ab6bc1215793dd61f706f136a5360c9d19b0edad5727ad446ce4a436c'
AND (
token = 'NnMsAK3fgKuuvDWgrFVLIHR08BTeMw+Lpz0NBlnDQso='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)