UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+lf3SzLxWt+fU4EOElJubKrZmQejvq51fohlJF0hlOQ='
WHERE
key_id = '68b64a82bd5a8a1145dc70a1822c9e685392587443fafc537f9b06fc95f0d0bf'
AND (
token = '+lf3SzLxWt+fU4EOElJubKrZmQejvq51fohlJF0hlOQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)