UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zGJguQ95x229S1fb4+UNh96p6UK07sSratGftVWd/q8='
WHERE
key_id = '8348b9223bd8c9b8e5677485a1b2530517f367c4f8e80b0e9cd1519700fb5712'
AND (
token = 'zGJguQ95x229S1fb4+UNh96p6UK07sSratGftVWd/q8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)