UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'UXG+26XE5bm/covct7vt/VoC891GP/KcpK0pZFrd990=' 
WHERE 
  key_id = 'd2b6c345c22768f2e967e689d75434e9630ca5c434a75d6965ba53fbd0aea118' 
  AND (
    token = 'UXG+26XE5bm/covct7vt/VoC891GP/KcpK0pZFrd990=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00037