UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'vNA3PvnV78JIxcBWYSf8j/iKh6tUq6YXIomwNJFYd6o='
WHERE
key_id = '64a102df3d110dc69fb5bd163b65494d58c99f7ad2c6c5e2a7a328199bb997e7'
AND (
token = 'vNA3PvnV78JIxcBWYSf8j/iKh6tUq6YXIomwNJFYd6o='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)