UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'DnD0vSkPbUUVzjMTUt/wcx1BuzE1VJZ6jUAdk9GDR50='
WHERE
key_id = 'd2334fc7ec4ce1e38ba78cdfc23a39c312a7b84e775e3a8c45f672e74c60df68'
AND (
token = 'DnD0vSkPbUUVzjMTUt/wcx1BuzE1VJZ6jUAdk9GDR50='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)