UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'xHqhmPvKOBy8aPmOau6dx/kVHOLaAloln2jSS6DZA/E=' 
WHERE 
  key_id = '0b688700c9da5d2d7ed96cd2b569edfa66684328e39a5e3f290eef692dcd85fb' 
  AND (
    token = 'xHqhmPvKOBy8aPmOau6dx/kVHOLaAloln2jSS6DZA/E=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00048