UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '7SAEv8rwTTvv7Hz73ujltxPIHo9BRE8KM0L4ng/8LE0=' 
WHERE 
  key_id = '76a4afdeb53fd54f238cb774f29a9e45c50431b64d618a0ce2e0e14895a5cb80' 
  AND (
    token = '7SAEv8rwTTvv7Hz73ujltxPIHo9BRE8KM0L4ng/8LE0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00030