UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'bvAKpywAGIct1TLIjFHZmdR3wlKZ1QaVlZ6eyu15/00=' 
WHERE 
  key_id = '4037ba6991411e63a8c1701be14c42a731c79a70dc124bad2d00d1048baa4b9a' 
  AND (
    token = 'bvAKpywAGIct1TLIjFHZmdR3wlKZ1QaVlZ6eyu15/00=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033