UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ZooblOhdl07bvwFSDGy3pHafl1IYGZLdhyc3M2wBzpk='
WHERE
key_id = '8db01a5470416ab82aa5aa24560c88ae0327084f3d9ba2ff406d1adeeccf0d82'
AND (
token = 'ZooblOhdl07bvwFSDGy3pHafl1IYGZLdhyc3M2wBzpk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)