UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zVPn0c1rwgO7WtAz9CKlcOe7bw/p0uwU8maVgzTS1wg='
WHERE
key_id = '6790224a0062e8c3fc8c5dfb1d7c79ed3ba18ddffb64fb579a711633dad48cd6'
AND (
token = 'zVPn0c1rwgO7WtAz9CKlcOe7bw/p0uwU8maVgzTS1wg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)