UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'YpVOzzkiBjNWDyK8gR8KVxuaCs2qiYWcIrxFay5Saos=' 
WHERE 
  key_id = '97cb3437de0df7a6623e0b9043ee02b087bf5d3c8fa4bcfc9a4f5c330ac5a8dc' 
  AND (
    token = 'YpVOzzkiBjNWDyK8gR8KVxuaCs2qiYWcIrxFay5Saos=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00034