UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '0K1+EHilMjLn82uFN1gQBynVvQjhCSbHh2aJ+6o6HLI='
WHERE
key_id = '69e48fc2a85de3df1541e20304aaf94cb11f54ef5d1e613830dfcb6bf400272b'
AND (
token = '0K1+EHilMjLn82uFN1gQBynVvQjhCSbHh2aJ+6o6HLI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)