UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'NeNLZXAYzKeO03+6A5CsaZeUvTq7d8ZJlSN4C/Sxuo0='
WHERE
key_id = '472f781bd9465568aab6c45d3e7f3fd1c3096fd7c86fcb740fa3bfa953b6f0eb'
AND (
token = 'NeNLZXAYzKeO03+6A5CsaZeUvTq7d8ZJlSN4C/Sxuo0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)