UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '15Dsk76nDj1LhPOBhYAdnX1laobwKIZGS4ZOLQjbDwc='
WHERE
key_id = '086ebcedee4869a2b2ddbcab93b177a55d02ce24f4fd81e0bdd04661de4aadc4'
AND (
token = '15Dsk76nDj1LhPOBhYAdnX1laobwKIZGS4ZOLQjbDwc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)