UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'iAYVBX6sIc5HsErhrKqezci49VG3vJjI8VEfO4J/UQI=' 
WHERE 
  key_id = '29251ea30e0af40e747a5c66f40f616a4bb069cb3824b79f9651dcdeac827578' 
  AND (
    token = 'iAYVBX6sIc5HsErhrKqezci49VG3vJjI8VEfO4J/UQI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00017