UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'S+/ZJDPqas98YTWhz6kteP5KBFVk8/k72nhjSaiRkxg='
WHERE
key_id = '09193fe86cfb73c7061d9e639a10a21c4909116c9b99465129099fb3d7e95ba8'
AND (
token = 'S+/ZJDPqas98YTWhz6kteP5KBFVk8/k72nhjSaiRkxg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)