UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'qnQJ2E6/zVul4QLEHwRsAs+yEDh9fL2ysSU9yh85y44=' 
WHERE 
  key_id = '73d281f4765ca029051eb7779fb9abffc7172139141d1ea4d68cb70fc7f40ae1' 
  AND (
    token = 'qnQJ2E6/zVul4QLEHwRsAs+yEDh9fL2ysSU9yh85y44=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00047